[inject templates/en.xd]
[set-title The One Rule for manipulating equations | xigoi]
[show-title The One Rule for manipulating equations]
[<p> .notice; All variables in this article are implicitly universally quantified for brevity.]
[p Manipulating equations is hard, right? There are so many rules to remember[...]]
[p Wrong. There is actually only one rule, known as the [term substitution property] of equality:]
[$$ \boxed{a = b \implies f(a) = f(b)}]
[p That's it. Nobody teaches this in school, they'll teach you [" you can multiply both sides of the equation, except by zero] and what not, but in reality, it's that simple.]
[p However, in order to apply the rule correctly, it's crucial to understand the difference between implication and equivalence. The rule [bf works only one way]. There's a variant that goes both ways, but it's kind of a tautology, so there isn't really a point in using it:]
[theorem If [$ f] is an injective function, then [$ a = b \iff f(a) = f(b)].]
[proof
  [.> Follows from the substitution property.]
  [.< Follows from the definition of an injective function.]
]
[p Now we can see how all the specific rules easily follow from the substitution property.]
[theorem [$ a = b \iff a \pm c = b \pm c]]
[proof
  [.> Let [$ f(x) = x \pm c] and use the substitution property.]
  [.< Let [$ f(x) = x \mp c] and use the substitution property.]
]
[theorem [$ a = b \implies a \cdot c = b \cdot c][;] the implication is an equivalence iff [$ c \ne 0]]
[proof
  [.> Let [$ f(x) = x \cdot c] and use the substitution property.]
  [.< Given that [$ c \ne 0], let [$ f(x) = [/ x; c]] and use the substitution property.]
]
[theorem [$ a = b \iff [/ a; c] = [/ b; c]]]
[proof
  Note that [$ c] must not equal [$ 0], otherwise the right-hand side is not defined.
  [.> Let [$ f(x) = [/ x; c]] and use the substitution property.]
  [.< Let [$ f(x) = x \cdot c] and use the substitution property.]
]
[theorem [$ a = b \iff [/ a] = [/ b]]]
[proof
  Note that [$ a,b] must not equal [$ 0], otherwise the right-hand side is not defined.
  [.> Let [$ f(x) = [/ x]] and use the substitution property.]
  [.< Let [$ f(x) = [/ x]] and use the substitution property.]
]
[theorem [$ a = b \implies a^2 = b^2][;] the implication is an equivalence iff there is a guarantee that [$ a \ge 0 \land b \ge 0]]
[proof
  [.> Let [$ f(x) = x^2] and use the substitution property.]
  [.< Given that [$ a \ge 0 \land b \ge 0], it follows that [$ a = \sqrt{a^2} \land b = \sqrt{b^2}]. Let [$ f(x) = \sqrt{x}] and use the substitution property.]
]
[theorem [$ a = b \iff \sqrt{a} = \sqrt{b}]]
[proof Note that [$ a,b] must be positive, otherwise the expressions are not defined.
  [.> Let [$ f(x) = \sqrt{x}] and use the substitution property.]
  [.< Let [$ f(x) = x^2] and use the substitution property.]
]
[theorem [$ a = b \implies c^a = c^b] for [$ c > 0]. The implication is an equivalence iff [$ c > 0 \land c \ne 1]]
[proof
  [.> Let [$ f(x) = c^x] and use the substitution property.]
  [.< Let [$ f(x) = \log_c(x)] and use the substitution property.]
]
[theorem [$ a = b \iff \log_c(a) = \log_c(b)] for [$ c > 0 \land c \ne 1]]
[proof Note that [$ a,b] must be positive, otherwise the expressions are not defined.
  [.> Let [$ f(x) = \log_c(x)] and use the substitution property.]
  [.< Let [$ f(x) = c^x] and use the substitution property.]
]
[p Notice how all the theorems and proofs look the same, aside from having to be careful about injectivity. Is there really a point in memorizing something so trivial?]
